package com.hcb.micro.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.hcb.micro.dao.interfaceClass.ProductMapper;
import com.hcb.micro.dto.Product;
import com.hcb.micro.dto.Union;
import com.hcb.micro.service.IProductService;

@Service("ProductService")
public class ProductServiceImpl implements IProductService {

	@Autowired
	ProductMapper productMapper;
	
	@Override
	public int deleteByPrimaryKey(Integer fakeId) {
		return productMapper.deleteByPrimaryKey(fakeId);
	}

	@Override
	public int insert(Product record) {
		return productMapper.insert(record);
	}

	@Override
	public int insertSelective(Product record) {
		return productMapper.insertSelective(record);
	}

	@Override
	public Product selectByPrimaryKey(Integer fakeId) {
		return productMapper.selectByPrimaryKey(fakeId);
	}

	@Override
	public int updateByPrimaryKeySelective(Product record) {
		return productMapper.updateByPrimaryKeySelective(record);
	}

	@Override
	public int updateByPrimaryKey(Product record) {
		return productMapper.updateByPrimaryKey(record);
	}

	@Override
	public List<Product> selectByPara(Map<String, Object> para) {
		return productMapper.selectByPara(para);
	}

	@Override
	public int insertProductLog(Map<String, Object> para) {
		
		return productMapper.insertProductLog(para);
	}

	@Override
	public List<Map<String, Object>> selectProLogByPara(Map<String, Object> para) {
		
		return productMapper.selectProLogByPara(para);
	}

	@Override
	public Map<String, Object> selectProLogById(Integer id) {

		return productMapper.selectProLogById(id);
	}

	@Override
	public int delProPriLog(Integer id) {

		return productMapper.delProPriLog(id);
	}

	@Override
	public int updateProPriLog(Map<String, Object> map) {
		
		return productMapper.updateProPriLog(map);
	}

	@Override
	public int delProPriLogByProductId(Integer productId) {

		return productMapper.delProPriLogByProductId(productId);
	}
	
	@Override
	public  List<Map<String, Object>> selectToApply(Map<String,Object> para) {
		return productMapper.selectToApply(para);
	}
	
	@Override
	public int updateById(Map<String, Object> para){

		return productMapper.updateById(para);
	}
	
	
}
